home *** CD-ROM | disk | FTP | other *** search
/ Language/OS - Multiplatform Resource Library / LANGUAGE OS.iso / cpp_libs / nihcl-30.lha / nihcl-3.0 / ex / Circle.h < prev    next >
C/C++ Source or Header  |  1990-05-15  |  849b  |  28 lines

  1. #ifndef CIRCLE_H
  2. #define CIRCLE_H
  3.  
  4. // Circle.h -- Circle shape
  5.  
  6. // $Header: /afs/alw.nih.gov/unix/sun4_40c/usr/local/src/nihcl-3.0/share/ex/RCS/Circle.h,v 3.0 90/05/15 22:43:30 kgorlen Rel $
  7.  
  8. #include "Shape.h"
  9.  
  10. class Circle: public Shape {
  11.     DECLARE_MEMBERS(Circle);
  12.     int rad;            // radius of circle
  13. protected:              // storer() functions for object I/O
  14.     virtual void storer(OIOofd&) const;
  15.     virtual void storer(OIOout&) const;
  16. public:
  17.     Circle(const Point& c, int r) : Shape(c) { rad = r; }
  18.     bool operator==(const Circle&) const;
  19.     bool operator!=(const Circle& a) const { return !(*this==a); }
  20.     virtual void draw() const;
  21.     virtual unsigned hash() const;
  22.     virtual bool isEqual(const Object&) const;
  23.     virtual void printOn(ostream& strm =cout) const;
  24.     virtual const Class* species() const;
  25. };
  26.  
  27. #endif
  28.